package com.sg.model.oms.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.sg.framework.common.annotations.LikeFlag;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import com.sg.framework.common.po.BaseEntity;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.io.Serial;
import java.util.Date;

/**
 * 用于部门类型、职务类型、就职类型、就职状态字段的分类；目前除了部门类型是强输入数据，其他三个都是弱关系资料展示用。
 *
 * @author xxx
 */
@Data
@Accessors(chain = true)
@TableName("oms_org_type_dictionary")  //1-3-16组织架构类型字典表
public class TypeDictionary implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;


    /**
     * 类型字典ID
     */
    @TableId(value = "type_dictionary_id", type = IdType.ASSIGN_UUID)
    @NotNull(message = "typeDictionaryId不能为空")
    private String typeDictionaryId;
    /**
     * 主题标识
     */
    @TableField(value = "theme_code")
    @Schema(description = "主题标识")
    @LikeFlag(likeType = "LIKE")
    private String themeCode;

    /**
     * 层级
     */
    @TableField(value = "level_number")
    @Schema(description = "层级")
    private Long levelNumber;

    /**
     * 上级类型字典编码
     */
    @TableField(value = "parent_type_dictionary_code")
    @Schema(description = "上级类型字典编码")
    private String parentTypeDictionaryCode;

    /**
     * 类型用途编码 DEPT_TYPE:部门类型 POSITION_CLASS:职务类别 INDUCTION_TYPE:就职类型 INDUCTION_STATE:就职状态 WROK_TASK_SOURCE_CONF:工作任务来源 TASK_CATEGORIES:任务分类
     */
    @TableField(value = "purpose_code")
    @NotNull(message = "类型用途编码不能为空")
    @Schema(description = "类型用途编码")
    private String purposeCode;

    /**
     * 排序
     */
    @TableField(value = "order_number")
    @NotNull(message = "排序不能为空")
    @Schema(description = "排序")
    private Long orderNumber;

    /**
     * 是否系统数据 TRUE:是 FALSE:否
     */
    @TableField(value = "is_system_data")
    @Schema(description = "是否系统数据")
    private String isSystemData;

    /**
     * 组织ID
     */
    @TableField(value = "organization_id")
    @Schema(description = "组织ID")
    private String organizationId;
    /**
     * 类型字典编码
     */
    @TableField(value = "type_dictionary_code")
    @NotNull(message = "类型字典编码不能为空")
    @Schema(description = "类型字典编码")
    private String typeDictionaryCode;
    /**
     * 类型字典名称
     */
    @TableField(value = "type_dictionary_name")
    @NotNull(message = "类型字典名称不能为空")
    @Schema(description = "类型字典名称")
    @LikeFlag(likeType = "LIKE")
    private String typeDictionaryName;

    /**
     * 主体生命周期 CURRENTLY_VALID:当前有效 EDITING:正在编辑 ARCHIVING:历史存档
     */
    @TableField(value = "subject_life_cycle")
    @NotNull(message = "主体生命周期不能为空")
    @Schema(description = "主体生命周期")
    private String subjectLifeCycle;
    /**
     * 是否存档 TRUE:是 FALSE:否
     */
    @TableField(value = "is_archive")
    @NotNull(message = "是否存档不能为空")
    @Schema(description = "是否存档")
    private String isArchive;
    /**
     * 操作人就职记录ID
     */
    @TableField(value = "operation_induction_id")
    @NotNull(message = "操作人就职记录ID不能为空")
    @Schema(description = "操作人就职记录ID")
    private String operationInductionId;
    /**
     * 创建人就职记录ID
     */
    @TableField(value = "create_induction_id")
    @NotNull(message = "创建人就职记录ID不能为空")
    @Schema(description = "创建人就职记录ID")
    private String createInductionId;
    /**
     * 发布人就职记录ID
     */
    @TableField(value = "release_induction_id")
    @Schema(description = "发布人就职记录ID")
    private String releaseInductionId;
    /**
     * 存档人就职记录ID
     */
    @TableField(value = "archive_induction_id")
    @Schema(description = "存档人就职记录ID")
    private String archiveInductionId;
    /**
     * 操作时间
     */
    @TableField(value = "operate_time")
    @NotNull(message = "操作时间不能为空")
    @Schema(description = "操作时间")
    private Date operateTime;
    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @NotNull(message = "创建时间不能为空")
    @Schema(description = "创建时间")
    private Date createTime;
    /**
     * 发布时间
     */
    @TableField(value = "release_time")
    @Schema(description = "发布时间")
    private Date releaseTime;
    /**
     * 存档时间
     */
    @TableField(value = "archive_time")
    @Schema(description = "存档时间")
    private Date archiveTime;
    /**
     * 是否作废 TRUE:是 FALSE:否
     */
    @TableField(value = "is_valid")
    @NotNull(message = "是否作废不能为空")
    @Schema(description = "是否作废")
    private String isValid;
    /**
     * 创建于空间ID
     */
    @TableField(value = "space_id")
    @NotNull(message = "创建于空间ID不能为空")
    @Schema(description = "创建于空间ID")
    private String spaceId;
    /**
     * 创建于联盟应用ID
     */
    @TableField(value = "app_id")
    @NotNull(message = "创建于联盟应用ID不能为空")
    @Schema(description = "创建于联盟应用ID")
    private String appId;
}
